<template>
	<div class="resaleAudiList content-wrap">
		<div class="content-top-box">
			<!-- 搜索区域 -->
			<ul class="search-container">
				<li>
					<span class="search-item-name">手机号：</span>
					<el-input class="search-item-content search-item-text" placeholder="请输入手机号" v-model="phone" clearable maxlength="11" @clear="clearPhoneFn">
					</el-input>
				</li>
				<li>
					<span class="search-item-name">姓名：</span>
					<el-input class="search-item-content search-item-text" placeholder="请输入姓名" v-model="userName" clearable @clear="clearUserName">
					</el-input>
				</li>
				<li>
					<span class="search-item-name">支付时间：</span>
					<el-date-picker v-model="payDate" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd HH:mm:ss" @change="changePayDate">
					</el-date-picker>
				</li>
				<li>
					<span class="search-item-name">支付方式：</span>
					<el-select v-model="payMethod" placeholder="请选择" clearable @change="changePayType">
						<el-option v-for="item in optionsMethods" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</li>
				<li>
					<span class="search-item-name">通知状态：</span>
					<el-select v-model="reminderMark" placeholder="请选择" clearable @change="changetzType">
						<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</li>
				<li>
					<el-button class="search-btn" type="primary" icon="el-icon-search" @click="searchFn" v-if="searchBtn">查询</el-button>
					<download-excel class="export-excel-wrapper" :data="jsonData" :fields="jsonFields" name="交货期提醒表.xls" v-if="exportBtn">
						<!-- 上面可以自定义自己的样式，还可以引用其他组件button -->
						<el-button class="search-btn" type="primary" icon="el-icon-download">导出</el-button>
					</download-excel>

				</li>
			</ul>
		</div>

		<div class="content-bottom-box">
			<!-- 表格 -->
			<div class="content-form-box">
				<el-table v-loading="loadingFlag" :data="tableData" :height="tableHeight" ref="table" border stripe style="width: 100%">
					<el-table-column prop="serialNumber" label="序号" width="50" fixed>
					</el-table-column>
					<el-table-column prop="outTradeNo" label="订单编号" width="180" fixed>
					</el-table-column>
					<el-table-column prop="orderTime" label="支付时间" width="180">
					</el-table-column>
					<el-table-column prop="addressName" label="姓名" width="120">
					</el-table-column>
					<el-table-column prop="salesPrice" label="单价(元/kg)" width="120">
					</el-table-column>
					<el-table-column prop="productWeight" label="整牛重量(kg/头)" width="140">
					</el-table-column>
					<el-table-column prop="totalPrice" label="整牛单价(元/头)" width="120">
					</el-table-column>
					<el-table-column prop="minDeliveryTimeM" label="剩余交货期" width="110">
					</el-table-column>
					<el-table-column prop="minDeliveryTime" label="剩余交货天数" width="110">
						
					</el-table-column>
					<el-table-column prop="quantity" label="采购数量(头)" width="120" :show-overflow-tooltip="true">
					</el-table-column>
					<el-table-column prop="savesNum" label="剩余数量(头)" width="120">
					</el-table-column>
					<el-table-column prop="orderMoney" label="采购金额(元)" width="120">
					</el-table-column>
					<el-table-column prop="expressFee" label="物流费用(元)" width="160">
					</el-table-column>
					<el-table-column prop="payMoney" label="支付金额(元)" width="130">
					</el-table-column>
					<el-table-column prop="payMethod" label="支付方式" width="110">
						<template slot-scope="scope">
							<span>
		                    	{{scope.row.payMethod == 'wechat' ? '微信支付': '' 
								 || scope.row.payMethod == 'overpay' ? '余额支付': '' 
								}}
		                    </span>
						</template>
					</el-table-column>
					<el-table-column prop="addressPhone" label="手机号" width="130">
					</el-table-column>
					<el-table-column prop="address" label="收件地址" width="300" :show-overflow-tooltip="true">
					</el-table-column>
					<el-table-column prop="contractCode" label="合同编号" width="130">
					</el-table-column>
					<el-table-column prop="reminderMark" label="通知状态" width="130">
						<template slot-scope="scope">
							<span v-if="renoticeBtn">
		                    	{{scope.row.reminderMark == '1' ? '待通知': '' 
								 || scope.row.reminderMark == '2' ? '已通知': '' 
								 || scope.row.reminderMark == '3' ? '再次通知': '' 
								}}
		                    </span>
						</template>
					</el-table-column>
					<el-table-column prop="reminderNote" label="备注" width="130">
					</el-table-column>
					<el-table-column label="操作" width="130" fixed="right">
						<template slot-scope="scope">
							<el-button @click="showDialog(scope.row)" type="text" size="small" v-if="scope.row.reminderMark == 1 && noticeBtn">待通知</el-button>
							<el-button @click="showDialog(scope.row)" type="text" size="small" disabled v-else-if="scope.row.reminderMark == 2 && noticeBtn">已通知</el-button>
							<el-button @click="showDialog(scope.row)" type="text" size="small" v-else-if="scope.row.reminderMark == 3 && noticeBtn">再次通知</el-button>
							<!--<el-button @click="showDialog(scope.row)" type="text" size="small" v-if="noticeBtn">通知</el-button>-->
							<el-button @click="checkResaleInfoFn(scope.row)" type="text" size="small" v-if="detailBtn">详情</el-button>
						</template>
					</el-table-column>
				</el-table>
			</div>

			<!-- 页码 -->
			<div class="content-Page-container">
				<BaseFormPage :pagination="pagination" @cFirstPageFn="cFirstPageFn" @cLastPageFn="cLastPageFn" @cJumpPageFn="cJumpPageFn" @cPreFn="cPreFn" @cNextFn="cNextFn" @cRefreshFn="cRefreshFn">
				</BaseFormPage>
			</div>
			<!-- 审核 -->
			<el-dialog title="交货通知" :visible.sync="dialogVisible" width="527px" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false" center>
				<div class="dialog-wrap">
					<p class="title">审核信息</p>
					<ul class="dialogList">
						<li>
							<span class="left">姓名</span>
							<span class="right">{{detailData.addressName}}</span>
						</li>
						<li>
							<span class="left">手机号</span>
							<span class="right">{{detailData.addressPhone}}</span>
						</li>
						<li>
							<span class="left">订单编号</span>
							<span class="right">{{detailData.outTradeNo}}</span>
						</li>
						<li>
							<span class="left">采购时间</span>
							<span class="right">{{detailData.createTime}}</span>
						</li>
						<li>
							<span class="left">采购单价(元/kg)</span>
							<span class="right">{{detailData.salesPrice}}</span>
						</li>
						<li>
							<span class="left">整牛重量(元/头)</span>
							<span class="right">{{detailData.productWeight}}</span>
						</li>
						<li>
							<span class="left">整牛单价(kg/头)</span>
							<span class="right">{{detailData.totalPrice}}</span>
						</li>
						<li>
							<span class="left">剩余交货期</span>
							<span class="right">{{detailData.minDeliveryTimeM}}个月</span>
						</li>
						<li>
							<span class="left">剩余交货天数</span>
							<span class="right">{{detailData.minDeliveryTime}}天</span>
						</li>
						<li>
							<span class="left">养殖地区</span>
							<span class="right er-biao">{{detailData.productCity}}</span>
						</li>
						<li>
							<span class="left">采购数量(头)</span>
							<span class="right">{{detailData.quantity}}</span>
						</li>
						<li>
							<span class="left">转售中数量(头)</span>
							<span class="right">{{detailData.sellingNum}}</span>
						</li>
						<li>
							<span class="left">已转售数量(头)</span>
							<span class="right">{{detailData.sellOutNum}}</span>
						</li>
						<li>
							<span class="left">供货中数量(头)</span>
							<span class="right">{{detailData.supplyNum}}</span>
						</li>
						<li>
							<span class="left">已供货数量(头)</span>
							<span class="right">{{detailData.suppliedNum}}</span>
						</li>
						<li>
							<span class="left">剩余数量(头)</span>
							<span class="right">{{detailData.savesNum}}</span>
						</li>
						<li>
							<span class="left">收件地址</span>
							<span class="right">{{detailData.addressProvince + detailData.addressCity + detailData.addressArea + detailData.addressDetail}}</span>
						</li>
						<el-form ref="ruleForm" :model="buyData" class="demo-ruleForm" labelPosition='right'>
							<li>
								<span class="left">处理</span>
								<span class="right">
									<el-form-item prop="reminderMark">
								  		<el-radio-group v-model="buyData.reminderMark" @change="selectState">
										    <el-radio label="2">已通知</el-radio>
										    <el-radio label="3">再次通知</el-radio>
										</el-radio-group>
									</el-form-item>
								</span>
									
							</li>
							<li>
								<span class="left">备注</span>
								<span class="right last-right">
									<el-form-item prop="reminderNote">
						  				<el-input type="textarea" autosize v-model="buyData.reminderNote" placeholder="请输入内容"></el-input>
						  			</el-form-item>
						  		</span>
							</li>
						</el-form>
					</ul>
					<span slot="footer" class="dialog-footer">
						<el-button @click="cancelDialog('ruleForm')">取 消</el-button>
						<el-button type="primary" @click="keepDialog('ruleForm')">确 定</el-button>
					</span>
				</div>
			</el-dialog>
		
			<!-- 弹窗 -->
		<el-dialog 
		    title="订单详情" 
		    :visible.sync="dialogFlag"
		    :show-close="false"
		    width="804px"
		>
		    <div class="dialog-box">
		        <div class="info-detail-box">
		            <div class="info-detail-list">
		                <ul>
		                    <li class="list-title">订单信息</li>
		                    <li>
		                        <span class="info-tag-name">姓名：</span>
		                        <span class="info-tag-text">{{detailData.addressName}}</span>                
		                    </li>
		                    <li>
		                        <span class="info-tag-name">手机号：</span>
		                        <span class="info-tag-text">{{detailData.addressPhone}}</span>
		                    </li>
		                    <li>
		                        <span class="info-tag-name">性别：</span>
		                        <span class="info-tag-text">{{detailData.gender}}</span>
		                    </li>
		                    <li>
		                        <span class="info-tag-name">订单编号：</span>
		                        <span class="info-tag-text">{{detailData.outTradeNo}}</span>                
		                    </li>
			                <li>
			                    <span class="info-tag-name">支付时间：</span>
			                    <span class="info-tag-text">{{detailData.orderTime}}</span>
			                </li>
			                <li>
			                    <span class="info-tag-name">养殖周期：</span>
			                    <span class="info-tag-text">{{detailData.timeLimit}}{{detailData.timeType}}</span>
			                </li>
			                <li>
			                    <span class="info-tag-name">剩余交货期：</span>
			                    <span class="info-tag-text">{{detailData.minDeliveryTimeM}}个月</span>
			                </li>
							<li>
			                    <span class="info-tag-name">剩余交货天数：</span>
			                    <span class="info-tag-text">{{detailData.minDeliveryTime}}天</span>
			                </li>
			                <li>
			                    <span class="info-tag-name">采购数量(头)：</span>
			                    <span class="info-tag-text">{{detailData.quantity}}</span>
			                </li>
			                <li>
			                    <span class="info-tag-name">耳标号：</span>
			                    <span class="info-tag-text">{{detailData.cattleIdCard}}</span>
			                </li>
			                <li>
			                    <span class="info-tag-name">剩余数量(头)：</span>
			                    <span class="info-tag-text">{{detailData.savesNum}}</span>
			                </li>
			                 <li>
			                    <span class="info-tag-name">剩余耳标号：</span>
			                    <span class="info-tag-text">{{detailData.cattleIdCardRemaining}}</span>
			                </li>
			                 <li>
			                    <span class="info-tag-name">整牛单价(元/头)：</span>
			                    <span class="info-tag-text">{{detailData.totalPrice}}</span>
			                </li>
			                <li>
			                    <span class="info-tag-name">整牛重量(kg/头)：</span>
			                    <span class="info-tag-text">{{detailData.productWeight}}</span>
			                </li>
		                </ul>
		            </div>
		            
		            <ul class="info-detail-list">
		            	<li style="margin-top: 30px;">
		                    <span class="info-tag-name">单价(元/kg)：</span>
		                    <span class="info-tag-text">{{detailData.salesPrice}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">养殖地区：</span>
		                    <span class="info-tag-text">{{detailData.productCity}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">养殖牧场：</span>
		                    <span class="info-tag-text">{{detailData.farmName}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">采购金额(元)：</span>
		                    <span class="info-tag-text">{{detailData.orderMoney}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">物流费用(元)：</span>
		                    <span class="info-tag-text">{{detailData.expressFee}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">支付金额(元)：</span>
		                    <span class="info-tag-text">{{detailData.payMoney}} </span>
		                </li>
		                 <li>
		                    <span class="info-tag-name">支付方式：</span>
		                    <span class="info-tag-text" v-if="detailData.payMethod == 'wechat'">微信支付</span>
		                    <span class="info-tag-text" v-else-if="detailData.payMethod == 'overpay'">余额支付</span>
		                </li>
		                <li class="resetCss">
		                    <span class="info-tag-name">牛胴体重量(kg/头)：</span>
		                    <span class="info-tag-text">{{detailData.productCarcass}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">交货牛胴体(kg)：</span>
		                    <span class="info-tag-text">{{detailData.productCarcass * detailData.quantity}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">物流状态：</span>
		                    <span class="info-tag-text">{{detailData.logisticsStatus}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">通知状态：</span>
		                    <span class="info-tag-text" v-if="detailData.reminderMark == 1">待通知</span>
		                    <span class="info-tag-text" v-else-if="detailData.reminderMark == 2">已通知</span>
		                    <span class="info-tag-text" v-else-if="detailData.reminderMark == 3">再次通知</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">备注：</span>
		                    <span class="info-tag-text">{{detailData.reminderNote}}</span>
		                </li>
		                <li>
		                    <span class="info-tag-name">合同编号：</span>
		                    <span class="info-tag-text">{{detailData.contractCode}}</span>
		                </li>
		                <li class="last-oli">
		                    <span class="info-tag-name last-ospan">收件地址：</span>
		                    <span class="info-tag-text last-span2">{{detailData.addressProvince + detailData.addressCity + detailData.addressArea + detailData.addressDetail}}</span>
		                </li>
		            </ul>
		        </div>
		        <div class="dialog-btn">
		            <el-button type="primary" size="medium" @click="dialogFlag = false">关闭</el-button>
		        </div>
		    </div>
		</el-dialog>
		</div>
	</div>
</template>

<script>
	import Storage from "@/utils/storage";
	import BaseFormPage from '@/components/BaseFormPage';
	export default {
		components: {
			BaseFormPage
		},
		inject: ['reload'],
		data() {
			return {
				jsonFields: {
					"序号": "index",
					"订单编号": "outTradeNo",
					"支付时间": "orderTime", 
					"姓名": "addressName",
					"单价(元/kg)": "salesPrice",
					"整牛重量(kg/头)": "productWeight",
					"整牛单价(元/头)": "totalPrice",
					"剩余交货期": "minDeliveryTimeM",
					"剩余交货天数": "minDeliveryTime",
					"采购数量(头)": "quantity",
					"剩余数量(头)": "savesNum",
					"采购金额(元)": "orderMoney",
					"物流费用(元)": "expressFee",
					"支付金额(元)": "payMoney",
					"支付方式": "payMethod",
					"手机号": "addressPhone",
					"收件地址": "address",
					"合同编号": "contractCode",
					"通知状态 ": "reminderMark",
					"备注": "reminderNote"
				},
				dialogVisible: false, // 审核框
				loadingFlag: false, //表格数据加载状态
				dialogFlag: false, //弹窗显示状态
				phone: '',
				userName: '',
				startCreateTime: '',
				endCreateTime: '',
				options: [{
					value: '1',
					label: '待通知'
				}, {
					value: '2',
					label: '已通知'
				}, {
					value: '3',
					label: '再次通知'
				}],
				optionsMethods: [{
					value: 'wechat',
					label: '微信支付'
				}, {
					value: 'overpay',
					label: '余额支付'
				}],
				buyData: {
					id: '',
					reminderMark: '',
					reminderNote: ''
				},
				payDate: '',
				reminderMark: '',  // 通知状态 1=未提醒 2=已提醒
				payMethod: '',  // 支付方式
				payState: '',
				pageIndex: 1,
				pageSize: 20,
				tableHeight: 200, //表格初始高度
				tableData: [], //表格数据
				pagination: { //分页数据
					loadingFlag: false, //数据加载状态
					currentPage: 1, //当前页
					totalPage: 1, //总页数
					totalNum: 0, //总条数
					firstNum: 0, //分页显示起始值
					endNum: 0 //分页显示结束值
				},
				jsonData: [],
				
				jsonMeta: [
					[{
						"key": "charset",
						"value": "utf-8"
					}]
				],
				detailId: '',
				detailData: {},

				searchBtn: (JSON.parse(Storage.get('roleAuthIdArr'))).indexOf(236) == -1 ? false : true,
				exportBtn: (JSON.parse(Storage.get('roleAuthIdArr'))).indexOf(237) == -1 ? false : true,
				noticeBtn: (JSON.parse(Storage.get('roleAuthIdArr'))).indexOf(238) == -1 ? false : true,
				renoticeBtn: (JSON.parse(Storage.get('roleAuthIdArr'))).indexOf(239) == -1 ? false : true,
				detailBtn: (JSON.parse(Storage.get('roleAuthIdArr'))).indexOf(240) == -1 ? false : true,
			}
		},
		created(){
			this.getListData();
			
		},
		methods: {
			getListData(){    // 交货期提醒
				this.loadingFlag = true;
				this.pagination.loadingFlag = true;
				let params = {
					phone: this.phone,
					userName: this.userName,
					payMethod: this.payMethod,
					reminderMark: this.reminderMark,
					startCreateTime: this.startCreateTime,
					endCreateTime: this.endCreateTime,
					pgCt: this.pageIndex,
					pgSz: this.pageSize
				}
				if(!this.phone) {
					delete params.phone
				}
				if(!this.userName) {
					delete params.userName
				}
				if(!this.payMethod) {
					delete params.payMethod
				}
				if(!this.reminderMark) {
					delete params.reminderMark
				}
				if(!this.startCreateTime) {
					delete params.startCreateTime
				}
				if(!this.endCreateTime) {
					delete params.endCreateTime
				}
				this.$http.get('/cattleFlowReview/deliveryReminder/list', params)
				.then((res)=>{
					console.log(res)
					if(res.data.records.length > 0) {
							this.pagination.totalPage = res.data.pages;
							this.pagination.totalNum = res.data.total;
							res.data.records.forEach((item, index) => {
								//列表下标
	                            item.index = index
	                            //列表序号
	                            item.serialNumber = ((this.pageIndex - 1) * this.pageSize) + (index + 1)
								item.address = item.addressProvince + item.addressCity + item.addressArea + item.addressDetail;
								if(item.orderTime){
									item.orderTime = item.orderTime.replace('T', ' ')
								}
								item.minDeliveryTimeM = item.minDeliveryTimeM +'个月'
								item.minDeliveryTime = item.minDeliveryTime +'天'
								if(item.deliveryTime){
									item.deliveryTime = item.deliveryTime.split(' ')[0];
								}
								if(item.timeType == 1){  //交割周期单位1:月2：周3：天 ,
									item.timeType = '个月'
								} else if(item.timeType == 2){
									item.timeType = '周'
								}else if(item.timeType == 3){
									item.timeType = '天'
								}
								
								//无数据处理
								item.reminderNote = item.reminderNote || '--'
//								item.auditTime = item.auditTime || '--'
							})
							this.pagination.firstNum = res.data.records[0].serialNumber
							this.pagination.endNum = res.data.records[res.data.records.length - 1].serialNumber
						}else {
							this.pagination.currentPage = 1
							this.pagination.totalPage = 1
							this.pagination.totalNum = 0
							this.pagination.firstNum = 0
							this.pagination.endNum = 0
						}
						this.tableData = res.data.records;
				})
				.then(() => {
						if(this.tableData.length !== 0) {
							this.tableHeightFn();
						}
						this.loadingFlag = false;
						this.pagination.loadingFlag = false;
						this.getAllListData()
					})
			},
			getDetailData(){ // 详情接口
				this.$http.get('/cattleFlowReview/deliveryReminder/audit/' + this.detailId)
				.then(({data})=>{
					console.log(data)
					if(data.deliveryTime){
						data.deliveryTime = data.deliveryTime.split(' ')[0];
					}
					this.detailData = data;
				})
			},
			changePayDate() {
				if(this.payDate) {
					this.startCreateTime = this.payDate[0]
					this.endCreateTime = this.payDate[1].replace('00:00:00', '23:59:59')
				} else {
					this.startCreateTime = ''
					this.endCreateTime = ''
				}
				this.resetPageIndex()
				this.getListData()
			},
			changetzType(){ // 通知状态
				this.resetPageIndex()
				this.getListData()
			},
			changePayType(){ // 支付方式
				this.resetPageIndex()
				this.getListData()
			},
			resetPageIndex() { //重置页码
				this.pagination.currentPage = 1;
				this.pageIndex = 1;
			},
			clearPhoneFn() { //清空手机号
				this.resetPageIndex()
				this.getListData()
			},
			clearUserName() { //清空姓名
				this.resetPageIndex()
				this.getListData()
			},
			searchFn() {
				this.resetPageIndex()
				this.getListData()
			},
			cFirstPageFn(pageNum) { //首页
				this.pageIndex = pageNum;
				this.getListData()
			},
			cLastPageFn(pageNum) { //尾页
				this.pageIndex = pageNum;
				this.getListData()
			},
			cJumpPageFn(pageNum) { //页码跳转
				this.pageIndex = pageNum;
				this.getListData()
			},
			cPreFn(pageNum) { //上一页
				this.pageIndex = pageNum;
				this.getListData()
			},
			cNextFn(pageNum) { //下一页
				this.pageIndex = pageNum;
				this.getListData()
			},
			resetParams() { //重置参数

			},
			cRefreshFn() { //刷新
				this.reload()
			},
			checkResaleInfoFn(item) { // 详情点击
				console.log(item)
				this.detailId = item.id;
				this.getDetailData();
				this.dialogFlag = true;
			},
			selectState(value) {
				console.log(value)
				this.buyData.reminderMark = value;
			},
			showDialog(item) {
				this.buyData.id = item.id;
				this.detailId = item.id;
				this.getDetailData();
				this.dialogVisible = true;
			},
			cancelDialog(formName) {
				this.dialogVisible = false;
				this.$refs[formName].resetFields();
			},
			keepDialog(formName) {
				if(this.buyData.reminderMark){
					this.$http.get('/cattleFlowReview/deliveryReminder/remind', this.buyData)
					.then((res)=>{
						console.log(res)
						this.dialogVisible = false;
						this.$refs[formName].resetFields();
						this.getListData()
					})
				} else {
					this.$message({
			          message: '请选择处理状态',
			          type: 'warning',
			          offset: '70'
			        })
				}
				
			},
			tableHeightFn() { //表格高度
				let tableDataLength = this.tableData.length;
				let minHeight = tableDataLength == 0 ? 0 : 80; //根据需求距离底部的高度
				this.$nextTick(function() {
					//window.innerHeight:浏览器的可用高度
					//this.$refs.table.$el.offsetTop：表格距离浏览器的高度
					this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - minHeight;
					if(this.tableData.length <= 0) {
						this.tableHeight = '60vh'
					}

					// 通过捕获系统的onresize事件触发去改变原有的高度
					let self = this;
					window.onresize = function() {
						self.tableHeight = window.innerHeight - self.$refs.table.$el.offsetTop - minHeight;
						self.tableHeight = self.tableHeight < 200 ? 200 : self.tableHeight;
					}
				})
			},
			getAllListData(){    // 求购审核列表
				let params = {
					phone: this.phone,
					userName: this.userName,
					payMethod: this.payMethod,
					reminderMark: this.reminderMark,
					startCreateTime: this.startCreateTime,
					endCreateTime: this.endCreateTime,
					pgCt: 1,
					pgSz: 99999
				}
				if(!this.phone) {
					delete params.phone
				}
				if(!this.userName) {
					delete params.userName
				}
				if(!this.payMethod) {
					delete params.payMethod
				}
				if(!this.reminderMark) {
					delete params.reminderMark
				}
				if(!this.startCreateTime) {
					delete params.startCreateTime
				}
				if(!this.endCreateTime) {
					delete params.endCreateTime
				}
				this.$http.get('/cattleFlowReview/deliveryReminder/list', params)
				.then((res)=>{
				
					if(res.data.records.length > 0) {
							console.log(res.data.records)
							res.data.records.forEach((item, index) => {
								item.index = index + 1
								item.address = item.addressProvince + item.addressCity + item.addressArea + item.addressDetail;
								if(item.orderTime){
									item.orderTime = item.orderTime.replace('T', ' ')
								}
								if(item.deliveryTime){
									item.deliveryTime = item.deliveryTime.split(' ')[0];
								}
								item.minDeliveryTimeM = item.minDeliveryTimeM +'个月'
								item.minDeliveryTime = item.minDeliveryTime +'天'
								if(item.payMethod == 'wechat'){
									item.payMethod = '微信支付'
								} else if(item.payMethod == 'overpay'){
									item.payMethod = '余额支付'
								}
								if(item.reminderMark == '1'){
									item.reminderMark = '待通知'
								} else if(item.reminderMark == '2'){
									item.reminderMark = '已通知'
								} else if(item.reminderMark == '3'){
									item.reminderMark = '再次通知'
								}
								//无数据处理
//								item.remarks = item.remarks || '--'
							})
						}
						this.jsonData = res.data.records;
				})
			},
			
		},

	}
</script>
<style type="text/css">
	.resaleAudiList .dialog-wrap .el-input__inner,.resaleAudiList .dialog-wrap .el-textarea__inner {
		border-color: #fff !important;
	}
	.resaleAudiList .dialog-wrap .el-form-item{
		margin-bottom: 0;
	}
	.resaleAudiList .dialog-wrap .el-form-item__error{
		z-index: 9;
	}
</style>
<style lang="scss" scoped>
@import '@/assets/css/dialogDetail.scss';
.last-oli{
		display: inherit; 
		padding-left: 74px;
		position: relative;
		.last-ospan{
			position: absolute;
			left: 0;
			top: 0;
		}
		.last-span2{
			position: absolute;
			left: 145px;
			top: 0;
		}
	}
	
</style>